<!-- @format -->

<!DOCTYPE html>
<html>
  <head>
    <title>提交统计</title>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no"
    />
    <!-- 引入 FrozenUI -->
    <link
      rel="stylesheet"
      href="http://i.gtimg.cn/vipstyle/frozenui/2.0.0/css/frozen.css"
    />

    <script type="text/javascript">
      function formSubmit(btn) {
        btn.innerHTML = "提交中";
        btn.disabled = true;
        classnum = document.getElementById("classnum").innerHTML;
        window.location.href =
          "http://62.234.184.226/downfile?class=" + classnum;
      }
      function preview(obj) {
        var imgNmae = obj.innerHTML;
        classnum = document.getElementById("classnum").innerHTML;
        document.getElementById("preimg").src =
          "http://62.234.184.226/img/" + classnum + "/" + imgNmae;
        document.getElementById("imgshow").style.display = "";
      }
      function imgbtn() {
        document.getElementById("imgshow").style.display = "none"; //隐藏
      }
    </script>
  </head>
  <body>
    <div class="ui-form ui-border-t">
      <h1 class="title"><i id="classnum">{{.class}}</i>提交统计</h1>
      <div class="ui-btn-wrap">
        <button class="ui-btn-lg ui-btn-primary" onclick="formSubmit(this)">
          打包并下载
        </button>
      </div>
      <ul class="ui-list ui-list-single ui-list-link ui-border-tb">
        <li class="ui-border-t">
          <div class="ui-list-info">
            <h4 class="ui-nowrap">统计</h4>
            <div class="ui-txt-info">共{{.datalen}}张截图</div>
          </div>
        </li>
        <div class="ui-tooltips ui-tooltips-guide">
          <div class="ui-tooltips-cnt ui-border-b" style="text-align: right;">
            <i></i>点击图片名称可预览
          </div>
        </div>
        {{range $key, $value := .data }}
        <li class="ui-border-t">
          <div class="ui-list-info">
            <h4 class="ui-nowrap">{{$key}}</h4>
            <div class="ui-txt-info" onclick="preview(this)">{{$value}}</div>
          </div>
        </li>
        {{end}}
      </ul>
    </div>
    <div class="author">---项目作者:hu QQ:1091740788---</div>

    <div
      class="ui-dialog ui-dialog-operate show"
      id="imgshow"
      style="display: none;"
    >
      <div class="ui-dialog-cnt">
        <div class="ui-dialog-hd">
          <img id="preimg" src="" style="width: 200px;" />
        </div>
        <i class="ui-dialog-close" onclick="imgbtn()" data-role="button"></i>
      </div>
    </div>
  </body>
  <style>
    h1 {
      width: 100%;
      text-align: center;
      font-size: 26px;
      padding-top: 20px;
      padding-bottom: 20px;
      background: #fff;
    }
    .author {
      margin-top: 12px;
      text-align: center;
      font-size: small;
      color: #999999;
    }
    .ui-dialog-cnt {
      background-color: transparent;
    }
    .ui-dialog-operate .ui-dialog-cnt {
      width: 200px;
    }
    .ui-dialog-close {
      bottom: -50px;
    }
  </style>
</html>
